package com.weipai.springboot.module.dao.impl;

import com.weipai.springboot.model.GoodsCollection;
import com.weipai.springboot.module.dao.GoodsCollectionDao;
import com.weipai.springboot.module.mapper.GoodsCollectionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: 曹朋飞
 * @Date: 2018/09/14 18:59
 */
@Repository
public class GoodsCollectionDaoImpl implements GoodsCollectionDao{
    
    @Autowired
    GoodsCollectionMapper goodsCollectionMapper;
    
    @Override
    public List<GoodsCollection> verGoodsCollection(String customerId, String goodsId) {
        return goodsCollectionMapper.verGoodsCollection(customerId, goodsId);
    }

    @Override
    public int insert(GoodsCollection goodsCollection) {
        return goodsCollectionMapper.insertSelective(goodsCollection);
    }

    @Override
    public List<GoodsCollection> selectAllByGoodsCollection(String customerId, Integer page, Integer size) {
        return goodsCollectionMapper.selectAllByGoodsCollection(customerId,page,size);
    }

    @Override
    public int deleteByPrimaryKey(String customerId, String goodsId) {
        return goodsCollectionMapper.deleteByPrimaryKey(customerId, goodsId);
    }

    @Override
    public int deleteByAll(String customerId) {
        return goodsCollectionMapper.deleteByAll(customerId);
    }
}
